<header>
    <h3><?php echo lang('product_manage') ?> <span>- <?php echo lang('product_update') ?></span></h3>
</header>
<section class="welly">
    <form id="create_product" method="post"	action="" class="form-horizontal" enctype="multipart/form-data">
        <input type="hidden" name="submit" value="1"/>
        <input type="hidden" name="id" />
        <ul class="nav nav-tabs tab_styled_light">
            <li class="active"><a href="#tab1" data-toggle="tab"><?php echo lang('product_data') ?></a></li>
            <li><a href="#tab2" data-toggle="tab"><?php echo lang('product_info') ?></a></li>
            <li><a href="#tab3" data-toggle="tab"><?php echo lang('product_images') ?></a></li>
            <li><a href="#tab4" data-toggle="tab"><?php echo lang('product_catalogue') ?></a></li>
            <li><a href="#tab5" data-toggle="tab"><?php echo lang('product_location') ?></a></li>
            <li><a href="#tab6" data-toggle="tab"><?php echo lang('product_discount') ?></a></li>
        </ul>
        <div class="tab-content tab_content_light">
            <div id="tab1" class="tab-pane active">
                <div class="control-group">
                    <label class="control-label"><?php echo lang('product_image') ?></label>
                    <div class="controls">
                        <img src="" alt="" class="product_image"/><br />
                        <input type="file" name="image" class="input-xlarges"/>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label"><?php echo lang('product_price') ?></label>
                    <div class="controls">
                        <input type="text" name="price"" class="input-medium"/>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label"><?php echo lang('product_sale_price') ?></label>
                    <div class="controls">
                        <input type="text" name="sale_price"" class="input-medium"/>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label"><?php echo lang('product_start') ?></label>
                    <div class="controls">
                        <input type="text" name="start"" class="input-medium"/>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label"><?php echo lang('product_end') ?></label>
                    <div class="controls">
                        <input type="text" name="end"" class="input-medium"/>
                    </div>
                </div>
            </div>
            <div id="tab2" class="tab-pane fade">
                <ul class="nav nav-tabs tab_styled_light">
                    <?php foreach ($langs as $l) { ?>
                    <li<?php echo $l->id == $lang ? ' class="active"' : '' ?>><a href="#tab2<?php echo $l->id ?>" data-toggle="tab"><?php echo $l->name ?></a></li>
                    <?php } ?>
                </ul>
                <div class="tab-content tab_content_light">
                    <?php foreach ($langs as $l) { ?>
                    <div id="tab2<?php echo $l->id ?>" class="tab-pane<?php echo $l->id == $lang ? ' active' : ' fade' ?>">
                        <div class="control-group">
                            <label class="control-label"><?php echo lang('product_name') ?></label>
                            <div class="controls">
                                <input type="text" name="info[<?php echo $l->id ?>][name]""class="input-xlarge" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label"><?php echo lang('product_description') ?></label>
                            <div class="controls">
                                <textarea name="info[<?php echo $l->id ?>][meta_desc]"" class="input-xlarge" ></textarea>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label"><?php echo lang('product_advantages') ?></label>
                            <div class="controls">
                                <textarea name="info[<?php echo $l->id ?>][advantages]"" class="input-xlarge" ></textarea>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label"><?php echo lang('product_meta_desc') ?></label>
                            <div class="controls">
                                <textarea name="info[<?php echo $l->id ?>][meta_desc]"" class="input-xlarge" ></textarea>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label"><?php echo lang('product_meta_keyword') ?></label>
                            <div class="controls">
                                <textarea name="info[<?php echo $l->id ?>][meta_keyword]"" class="input-xlarge" ></textarea>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                </div>
            </div>
            <div id="tab3" class="tab-pane fade">
                <div class="control-group">
                    <label class="control-label" for="images"><?php echo lang('product_images') ?></label>
                    <div id="images" class="controls">
                        <div>
                            <input type="file" name="images_0" class="input-xlarges"/>
                            <input type="button" class="btn btn-info" id="add_image" value="<?php echo lang('product_add_image') ?>" />
                        </div>
                    </div>
                </div>
                <ul id="basicGallery" class="gallery_basic">

                </ul>
            </div>
            <div id="tab4" class="tab-pane fade">
                <label class="checkbox"><input type="checkbox" id="tab4_check"><b><?php echo lang('select_all')?></b></label>
                <?php foreach($catalogues as $catalogue){?>
                <label class="checkbox"><input type="checkbox" name="catalogues[]" value="<?php echo $catalogue->id?>" /><?php echo $catalogue->pre?><?php echo $catalogue->name?></label>
                <?php }?>
            </div>
            <div id="tab5" class="tab-pane fade">
                <label class="checkbox"><input type="checkbox" id="tab5_check"><b><?php echo lang('select_all')?></b></label>
                <?php foreach($locations as $location){?>
                <label class="checkbox"><input type="checkbox" name="locations[]" value="<?php echo $location->id?>" /><?php echo $location->pre?><?php echo $location->name?></label>
                <?php }?>
            </div>
            <div id="tab6" class="tab-pane fade">

            </div>
        </div>
        <hr>
        <div>
            <input type="submit" class="btn btn-success" value="<?php echo lang('ok') ?>" />
            <button class="btn"><?php echo lang('cancel') ?></button>
        </div>
    </form>
</section>